<?
// ====================================================================== //
//  Admin init Info
//  Quan Van Sinh
//  sinhvnb@vietnambiz.com
//  0972405165
// ====================================================================== //
//
//define url
defined('SITE_URL') || define('SITE_URL', $CONFIG['site_url']);
defined('ADMIN_URL') || define('ADMIN_URL', $CONFIG['admin_url']);
defined('ADMIN_UPLOAD_URL') || define('ADMIN_UPLOAD_URL', $CONFIG['upload_url']);
defined('ADMIN_JS_URL') || define('ADMIN_JS_URL', ADMIN_URL.'/js');
defined('ADMIN_CSS_URL') || define('ADMIN_CSS_URL', ADMIN_URL.'/styles');
defined('ADMIN_IMAGES_URL') || define('ADMIN_IMAGES_URL', ADMIN_URL.'/images');
defined('ADMIN_DEFAULT_MODULE') || define('ADMIN_DEFAULT_MODULE', "news");
//define directory
defined('SITE_BASE_DIR') || define('SITE_BASE_DIR', $CONFIG['site_dir']);
defined('ADMIN_MODULE_DIR') || define('ADMIN_MODULE_DIR', ADMIN_BASE_DIR.'/modules');
defined('ADMIN_INCLUDE_DIR') || define('ADMIN_INCLUDE_DIR', ADMIN_BASE_DIR.'/includes');
defined('ADMIN_LIBRARY_DIR') || define('ADMIN_LIBRARY_DIR', ADMIN_BASE_DIR.'/library');
defined('ADMIN_UPLOAD_DIR') || define('ADMIN_UPLOAD_DIR', $CONFIG['upload_dir']);

// Include functions HERE
include ADMIN_LIBRARY_DIR."/functions.php";
include ADMIN_LIBRARY_DIR."/common.php";

//=========================
//Vuong Van Binh
//Wanbin@vietnambiz.com
//Edit connection mysql
//=========================

//database connection
include (ADMIN_LIBRARY_DIR."/mysql.php");//database object
$db = new database();
$db-> db= array(
	"host" => $CONFIG['db_host'] , 
	"user" => $CONFIG['db_user'] , 
	"pass" => $CONFIG['db_pass'] ,
	"db" => $CONFIG['db_name']
);
$db->Debug = true;
$db->connect();
$db->query("set names utf8"); 
?>
